Skip to content

Conversation

@AleksaC
Copy link
Member

@AleksaC AleksaC commented Oct 18, 2025

I'm not sure if this meets the requirements to be included here, as it's not mentioned in the terraform language reference. However I do think that it's a natural extension of the rule, because it further reinforces the consistency of comment syntax.

@wata727
Copy link
Member

wata727 commented Oct 21, 2025

Please see the following documentation:

This ruleset does not provide configurable rules for personal/team style or usage preferences. If you'd like to enforce stylistic rules beyond the official Terraform Language recommendations, you should author your own ruleset plugin.

https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.13.0/docs/rules/README.md

As you say, this rule/option is not included in the official Terraform reference, so it would be difficult to accept it as part of this ruleset. Please understand that we have this policy because accepting all such options would result in an unmaintainable large ruleset.

@AleksaC
Copy link
Member Author

AleksaC commented Oct 21, 2025

Understandable

@AleksaC AleksaC closed this Oct 21, 2025
@bendrucker
Copy link
Member

bendrucker commented Oct 23, 2025

/* and */ are start and end delimiters for a comment that might span over multiple lines.

The # single-line comment style is the default comment style and should be used in most cases. Automatic configuration formatting tools may automatically transform // comments into # comments, since the double-slash style is not idiomatic.

If it didn't say might you could argue for not using multi-line syntax for a single line comment. But the docs are intentionally permissive.

Whereas for # vs // it's emphasized that // is handled by the parser but discouraged.

So yes, this would be a "style preference" for your own ruleset vs an option for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants